import java.util.Scanner;

public class Ex4_46{
	public static void main(String[] args){
		Scanner input = new Scanner(System.in);
		String s = "";
		short x = input.nextShort();
		for (int i = 0; i < 16; i++){
			int b = (x >> i) & 1;
			if (b == 0)
				s = '0' + s;
			else
				s = '1' + s;
		}
		System.out.println(s);
	}
}